from flask_socketio import SocketIO
from multiprocessing import Process
import views
from core import wsSock


if __name__ == "__main__":
    #开启子进程，来执行WebSocket请求
    p = Process(target=wsSock.run, args=('127.0.0.1',8000))
    p.start()
    # 启动Flask框架服务
    app = views.app
    socketio = SocketIO(app)
    socketio.run(app,'127.0.0.1',5000)
    p.join()

